package com.taijihuabao.modules.mapper;

import com.taijihuabao.modules.entity.ApprovalHistoryEntity;
import com.taijihuabao.modules.model.approval.vo.ApprovalVO;

import java.util.List;

/**
 *审批
 * @author Xiaoboyu
 */


public interface ApprovalHistoryMapper {

    /**
     * 修改审批
     * @param approvalHistoryEntity
     */
    void updateApproval(ApprovalHistoryEntity approvalHistoryEntity);

    /**
     * 新增审批
     * @param approvalHistoryEntity
     */
    void insertApproval(ApprovalHistoryEntity approvalHistoryEntity);

    /**
     * 删除审批
     * @param approvalHistoryEntity
     */
    void deleteApproval(ApprovalHistoryEntity approvalHistoryEntity);

    /**
     * 查询审批用户的所有审批历史任务
     * @param userId
     * @return
     */
    List<ApprovalVO> selectByApprovalUserId(Long userId);

    /**
     * 查询审批用户的单个审批单的所有审批历史任务
     * @param userId
     * @param approvalCode
     * @return
     */
    List<ApprovalVO> selectByApprovalUserIdAndApprovalCode(Long userId,String approvalCode);

    /**
     * 根据审批编码查询审批业务信息
     * @param approvalCode
     * @return
     */
    List<ApprovalVO> selectByApprovalCode(String approvalCode);

    /**
     *根据id查询
     * @param id
     * @return
     */
    ApprovalHistoryEntity selectById(Long id);

    /**
     *根据id修改审批任务
     * @param approvalHistoryEntity
     * @return
     */
    void updateApprovalTask(ApprovalHistoryEntity approvalHistoryEntity);

    /**
     *根据id修改审批任务
     * @param approvalHistoryEntity
     * @return
     */
    void updateApprovalUserId(ApprovalHistoryEntity approvalHistoryEntity);

}
